/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Conexion;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;

/**
 *
 * @author Emanuel
 */
public class cConexion {


    private static final String MYSQL_URL = "jdbc:mysql://localhost:3306/asi_db";

    private static final String MYSQL_USER = "ASI-UFG";
    private static final String MYSQL_PASSWD = "ASI2";

    public static Connection conectar_ds() {
        Connection cnn = null;
        try {
            DriverManager.registerDriver(new com.mysql.jdbc.Driver());
            cnn = DriverManager.getConnection(MYSQL_URL, MYSQL_USER, MYSQL_PASSWD);
            System.out.println("Conectado a: " + MYSQL_URL);
        } catch (SQLException ex) {
            System.out.println("Error al conectarse a la base de datos: " + ex.getMessage());
        } finally {
            return cnn;
        }
    }

    public static void main(String[] args) {
        
    }
}
